<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>店铺报表</title>
    <link rel="stylesheet" href="../css/common.css">
    <link rel="stylesheet" href="../css/page.css">
    <script src="../js/jquery-3.2.1.min.js"></script>
    <script src="../js/media.js"></script>
    <script src="../js/common.js"></script>



    <style>
        .bd-0 {
            display: none;
        }

        .active {
            display: block;
        }
    </style>
</head>

<body>
    <!--头部-->
    <!-- <div class="public-header flex">
        <span class="public-header-left-back"></span>
        <span class="public-header-center">店铺报表</span>
        <span class="public-header-right">新建</span>
    </div> -->

    <!--正文-->
    <div class="Shop-report bc-gray">
        <div class="hd flex">
            <a href="javascript:;" class="active">资金报表</a>
            <a href="javascript:;">经营报表</a>

        </div>
        <div class="bd">
            <div class="bd-1 bd-0 active">
                <ul class="ul-1">
                    <li class="title flex">
                        <span>成拍报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>今日成拍：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                </ul>
                <ul class="ul-2">
                    <li class="title flex">
                        <span>销售报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.1.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>今日已付款：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                    <li class="flex">
                        <span>今日已退款：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                </ul>
                <ul class="ul-3">
                    <li class="title flex">
                        <span>收款报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.2.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>今日已收款：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                </ul>
                <ul class="ul-4">
                    <li class="title flex">
                        <span>待收款报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.3.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>今日未发货：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                    <li class="flex">
                        <span>今日待确认：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                    <li class="flex">
                        <span>今日退款中: <font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                    <li class="flex">
                        <span>今日退货中：<font>1</font></span>
                        <span>笔数：<font>1</font></span>
                    </li>
                </ul>
            </div>
            <div class="bd-2 bd-0">
                <ul class="ul-1">
                    <li class="title flex">
                        <span>访客报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.4.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>今日浏览人数：<font>1</font></span>
                        <!-- <span>今日访问次数：<font>1</font></span> -->
                    </li>
                </ul>
                <ul class="ul-2">
                    <li class="title flex">
                        <span>粉丝报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.5.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>累积粉丝：<font>1</font></span>
                        <span>今日增长粉丝：<font>1</font></span>
                    </li>
                </ul>
                <ul class="ul-3">
                    <li class="title flex">
                        <span>产品报表</span>
                        <em onclick="jacascript:window.location.href='../page/Shop-report-more.1.html'">更多</em>
                    </li>
                    <li class="flex">
                        <span>今日发布件数：<font>1</font></span>
                        <span></span>
                    </li>
                </ul>
                <ul class="ul-4">
                    <li class="title flex">
                        <span>客户报表</span>
                        <em>更多</em>
                    </li>
                    <li class="flex">
                        <span>今日付款人数：<font>1</font></span>
                        <span>今日新客占比：<font>1</font></span>
                    </li>
                </ul>
            </div>

        </div>




    </div>



    <script>
        $(function () {
            $('.hd a').click(function () {
                var index = $(this).index();
                $(this).addClass('active').siblings().removeClass('active');
                $('.bd-0').eq(index).addClass('active').siblings().removeClass('active');
            })
            $.ajax({
                url: base_url + 'ZITAOHUI/report/funds',
                data: {
                    storeid: s_id
                },
                success: function (data) {
                    console.log(data);
                    let datas = data.extend.data;
                    let tpd = datas.tpd;
                    $('.bd-1 .ul-2 li:eq(1) span:eq(0) font').html(tpd.price)
                    $('.bd-1 .ul-2 li:eq(1) span:eq(1) font').html(tpd.num)
                    let tas = datas.tas;
                    $('.bd-1 .ul-1 li:eq(1) span:eq(0) font').html(tas.price)
                    $('.bd-1 .ul-1 li:eq(1) span:eq(1) font').html(tas.num)
                    let refunds = datas.refunds;
                    $('.bd-1 .ul-2 li:eq(2) span:eq(0) font').html(refunds.price)
                    $('.bd-1 .ul-2 li:eq(2) span:eq(1) font').html(refunds.num)
                    let receipt = datas.receipt;
                    $('.bd-1 .ul-3 li:eq(1) span:eq(0) font').html(receipt.price)
                    $('.bd-1 .ul-3 li:eq(1) span:eq(1) font').html(receipt.num)
                    let notShip = datas.notShip;
                    $('.bd-1 .ul-4 li:eq(1) span:eq(0) font').html(notShip.price)
                    $('.bd-1 .ul-4 li:eq(1) span:eq(1) font').html(notShip.num)
                    let notReceipt = datas.notReceipt
                    $('.bd-1 .ul-4 li:eq(2) span:eq(0) font').html(notReceipt.price)
                    $('.bd-1 .ul-4 li:eq(2) span:eq(1) font').html(notReceipt.num)
                    let returnGoods = datas.returnGoods;
                    $('.bd-1 .ul-4 li:eq(3) span:eq(0) font').html(returnGoods.price)
                    $('.bd-1 .ul-4 li:eq(3) span:eq(1) font').html(returnGoods.num)
                    let returnMoney = datas.returnMoney;
                    $('.bd-1 .ul-4 li:eq(4) span:eq(0) font').html(returnMoney.price)
                    $('.bd-1 .ul-4 li:eq(4) span:eq(1) font').html(returnMoney.num)
                }
            })

            $.ajax({
                url: base_url + 'ZITAOHUI/report/manage',
                data: {
                    storeid: s_id
                },
                success: function (data) {
                    console.log(data)
                    let datas = data.extend.data;
                    $('.bd-2 .ul-1 li:eq(1) span:eq(0) font').html(datas.views.num)
                    $('.bd-2 .ul-2 li:eq(1) span:eq(0) font').html(datas.fans.num)
                    $('.bd-2 .ul-2 li:eq(1) span:eq(1) font').html(datas.increase.num)
                    $('.bd-2 .ul-3 li:eq(1) span:eq(0) font').html(datas.publish.num)
                },
                error:function(data){
                    console.log(data)
                }
            })
        


        })
    </script>
</body>

</html>